/** @file

  Copyright 2006 - 2010 Unified EFI, Inc.<BR>
  Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>

  This program and the accompanying materials
  are licensed and made available under the terms and conditions of the BSD License
  which accompanies this distribution.  The full text of the license may be found at 
  http://opensource.org/licenses/bsd-license.php
 
  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 
**/
/*++

Module Name:

  SimpleTextInBBTestData.c

Abstract:

  Test Data of Simple Input Protocol

--*/


#include "SimpleTextInBBTestMain.h"



//
//Following tables are for automatic testing use.
//Conventions for 'Extended', 'CapsLock', 'Shift' and 'NumLock':
//'0': No,  '1': Yes,  '2': Don't Care.
//'Extended' stands for Extention of XT scan code
//

//
//printable keys
//
UINT8       PrintableKeyCheckingMap[][6] =
{
    //Unicode   //Extended  //XTScancode//CapsLock  //Shift     //NumLock
    '1',        0,          0x02,       2,          0,          0,
    '1',        0,          0x4f,       2,          0,          1,
    '2',        0,          0x03,       2,          0,          0,
    '2',        0,          0x50,       2,          0,          1,
    '3',        0,          0x04,       2,          0,          0,
    '3',        0,          0x51,       2,          0,          1,
    '4',        0,          0x05,       2,          0,          0,
    '4',        0,          0x4b,       2,          0,          1,
    '5',        0,          0x06,       2,          0,          0,
    '5',        0,          0x4c,       2,          0,          1,
    '6',        0,          0x07,       2,          0,          0,
    '6',        0,          0x4d,       2,          0,          1,
    '7',        0,          0x08,       2,          0,          0,
    '7',        0,          0x47,       2,          0,          1,
    '8',        0,          0x09,       2,          0,          0,
    '8',        0,          0x48,       2,          0,          1,
    '9',        0,          0x0a,       2,          0,          0,
    '9',        0,          0x49,       2,          0,          1,
    '0',        0,          0x0b,       2,          0,          0,
    '0',        0,          0x52,       2,          0,          1,
    'a',        0,          0x1e,       0,          0,          2,
    'a',        0,          0x1e,       1,          1,          2,
    'b',        0,          0x30,       0,          0,          2,
    'b',        0,          0x30,       1,          1,          2,
    'c',        0,          0x2e,       0,          0,          2,
    'c',        0,          0x2e,       1,          1,          2,
    'd',        0,          0x20,       0,          0,          2,
    'd',        0,          0x20,       1,          1,          2,
    'e',        0,          0x12,       0,          0,          2,
    'e',        0,          0x12,       1,          1,          2,
    'f',        0,          0x21,       0,          0,          2,
    'f',        0,          0x21,       1,          1,          2,
    'g',        0,          0x22,       0,          0,          2,
    'g',        0,          0x22,       1,          1,          2,
    'h',        0,          0x23,       0,          0,          2,
    'h',        0,          0x23,       1,          1,          2,
    'i',        0,          0x17,       0,          0,          2,
    'i',        0,          0x17,       1,          1,          2,
    'j',        0,          0x24,       0,          0,          2,
    'j',        0,          0x24,       1,          1,          2,
    'k',        0,          0x25,       0,          0,          2,
    'k',        0,          0x25,       1,          1,          2,
    'l',        0,          0x26,       0,          0,          2,
    'l',        0,          0x26,       1,          1,          2,
    'm',        0,          0x32,       0,          0,          2,
    'm',        0,          0x32,       1,          1,          2,
    'n',        0,          0x31,       0,          0,          2,
    'n',        0,          0x31,       1,          1,          2,
    'o',        0,          0x18,       0,          0,          2,
    'o',        0,          0x18,       1,          1,          2,
    'p',        0,          0x19,       0,          0,          2,
    'p',        0,          0x19,       1,          1,          2,
    'q',        0,          0x10,       0,          0,          2,
    'q',        0,          0x10,       1,          1,          2,
    'r',        0,          0x13,       0,          0,          2,
    'r',        0,          0x13,       1,          1,          2,
    's',        0,          0x1f,       0,          0,          2,
    's',        0,          0x1f,       1,          1,          2,
    't',        0,          0x14,       0,          0,          2,
    't',        0,          0x14,       1,          1,          2,
    'u',        0,          0x16,       0,          0,          2,
    'u',        0,          0x16,       1,          1,          2,
    'v',        0,          0x2f,       0,          0,          2,
    'v',        0,          0x2f,       1,          1,          2,
    'w',        0,          0x11,       0,          0,          2,
    'w',        0,          0x11,       1,          1,          2,
    'x',        0,          0x2d,       0,          0,          2,
    'x',        0,          0x2d,       1,          1,          2,
    'y',        0,          0x15,       0,          0,          2,
    'y',        0,          0x15,       1,          1,          2,
    'z',        0,          0x2c,       0,          0,          2,
    'z',        0,          0x2c,       1,          1,          2,
    'A',        0,          0x1e,       1,          0,          2,
    'A',        0,          0x1e,       0,          1,          2,
    'B',        0,          0x30,       1,          0,          2,
    'B',        0,          0x30,       0,          1,          2,
    'C',        0,          0x2e,       1,          0,          2,
    'C',        0,          0x2e,       0,          1,          2,
    'D',        0,          0x20,       1,          0,          2,
    'D',        0,          0x20,       0,          1,          2,
    'E',        0,          0x12,       1,          0,          2,
    'E',        0,          0x12,       0,          1,          2,
    'F',        0,          0x21,       1,          0,          2,
    'F',        0,          0x21,       0,          1,          2,
    'G',        0,          0x22,       1,          0,          2,
    'G',        0,          0x22,       0,          1,          2,
    'H',        0,          0x23,       1,          0,          2,
    'H',        0,          0x23,       0,          1,          2,
    'I',        0,          0x17,       1,          0,          2,
    'I',        0,          0x17,       0,          1,          2,
    'J',        0,          0x24,       1,          0,          2,
    'J',        0,          0x24,       0,          1,          2,
    'K',        0,          0x25,       1,          0,          2,
    'K',        0,          0x25,       0,          1,          2,
    'L',        0,          0x26,       1,          0,          2,
    'L',        0,          0x26,       0,          1,          2,
    'M',        0,          0x32,       1,          0,          2,
    'M',        0,          0x32,       0,          1,          2,
    'N',        0,          0x31,       1,          0,          2,
    'N',        0,          0x31,       0,          1,          2,
    'O',        0,          0x18,       1,          0,          2,
    'O',        0,          0x18,       0,          1,          2,
    'P',        0,          0x19,       1,          0,          2,
    'P',        0,          0x19,       0,          1,          2,
    'Q',        0,          0x10,       1,          0,          2,
    'Q',        0,          0x10,       0,          1,          2,
    'R',        0,          0x13,       1,          0,          2,
    'R',        0,          0x13,       0,          1,          2,
    'S',        0,          0x1f,       1,          0,          2,
    'S',        0,          0x1f,       0,          1,          2,
    'T',        0,          0x14,       1,          0,          2,
    'T',        0,          0x14,       0,          1,          2,
    'U',        0,          0x16,       1,          0,          2,
    'U',        0,          0x16,       0,          1,          2,
    'V',        0,          0x2f,       1,          0,          2,
    'V',        0,          0x2f,       0,          1,          2,
    'W',        0,          0x11,       1,          0,          2,
    'W',        0,          0x11,       0,          1,          2,
    'X',        0,          0x2d,       1,          0,          2,
    'X',        0,          0x2d,       0,          1,          2,
    'Y',        0,          0x15,       1,          0,          2,
    'Y',        0,          0x15,       0,          1,          2,
    'Z',        0,          0x2c,       1,          0,          2,
    'Z',        0,          0x2c,       0,          1,          2,
    '!',        0,          0x02,       2,          1,          2,
    '@',        0,          0x03,       2,          1,          2,
    '#',        0,          0x04,       2,          1,          2,
    '$',        0,          0x05,       2,          1,          2,
    '%',        0,          0x06,       2,          1,          2,
    '^',        0,          0x07,       2,          1,          2,
    '&',        0,          0x08,       2,          1,          2,
    '*',        0,          0x09,       2,          1,          2,
    '*',        0,          0x37,       2,          2,          2,
    '(',        0,          0x0a,       2,          1,          2,
    ')',        0,          0x0b,       2,          1,          2,
    '-',        0,          0x0c,       2,          0,          2,
    '-',        0,          0x4a,       2,          2,          1,
    '_',        0,          0x0c,       2,          1,          2,
    '=',        0,          0x0d,       2,          0,          2,
    '+',        0,          0x0d,       2,          1,          2,
    '+',        0,          0x4e,       2,          2,          1,
    0x08,       0,          0x0e,       2,          2,          2,//backspace
    0x09,       0,          0x0f,       2,          2,          2,//tab
    '[',        0,          0x1a,       2,          0,          2,
    ']',        0,          0x1b,       2,          0,          2,
    '{',        0,          0x1a,       2,          1,          2,
    '}',        0,          0x1b,       2,          1,          2,
    0x0d,       0,          0x1c,       2,          2,          2,//Enter
    0x0d,       1,          0x1c,       2,          2,          2,//Enter
    ';',        0,          0x27,       2,          0,          2,
    ':',        0,          0x27,       2,          1,          2,
    '\'',       0,          0x28,       2,          0,          2,
    '"',        0,          0x28,       2,          1,          2,
    '`',        0,          0x29,       2,          0,          2,
    '~',        0,          0x29,       2,          1,          2,
    '\\',       0,          0x2b,       2,          0,          2,
    '|',        0,          0x2b,       2,          1,          2,
    ',',        0,          0x33,       2,          0,          2,
    '<',        0,          0x33,       2,          1,          2,
    '.',        0,          0x34,       2,          0,          2,
    '.',        0,          0x53,       2,          0,          1,
    '>',        0,          0x34,       2,          1,          2,
    '/',        0,          0x35,       2,          0,          2,
    '/',        1,          0x35,       2,          2,          1,
    '?',        0,          0x35,       2,          1,          2,
    ' ',        0,          0x39,       2,          2,          2,
    '\0',       0,          0,          0,          0,          0//mark the end
};

CHAR16*       PrintableKeySymbol[] =
{
    L"1",
    L"1",
    L"2",
    L"2",
    L"3",
    L"3",
    L"4",
    L"4",
    L"5",
    L"5",
    L"6",
    L"6",
    L"7",
    L"7",
    L"8",
    L"8",
    L"9",
    L"9",
    L"0",
    L"0",
    L"a",
    L"a",
    L"b",
    L"b",
    L"c",
    L"c",
    L"d",
    L"d",
    L"e",
    L"e",
    L"f",
    L"f",
    L"g",
    L"g",
    L"h",
    L"h",
    L"i",
    L"i",
    L"j",
    L"j",
    L"k",
    L"k",
    L"l",
    L"l",
    L"m",
    L"m",
    L"n",
    L"n",
    L"o",
    L"o",
    L"p",
    L"p",
    L"q",
    L"q",
    L"r",
    L"r",
    L"s",
    L"s",
    L"t",
    L"t",
    L"u",
    L"u",
    L"v",
    L"v",
    L"w",
    L"w",
    L"x",
    L"x",
    L"y",
    L"y",
    L"z",
    L"z",
    L"A",
    L"A",
    L"B",
    L"B",
    L"C",
    L"C",
    L"D",
    L"D",
    L"E",
    L"E",
    L"F",
    L"F",
    L"G",
    L"G",
    L"H",
    L"H",
    L"I",
    L"I",
    L"J",
    L"J",
    L"K",
    L"K",
    L"L",
    L"L",
    L"M",
    L"M",
    L"N",
    L"N",
    L"O",
    L"O",
    L"P",
    L"P",
    L"Q",
    L"Q",
    L"R",
    L"R",
    L"S",
    L"S",
    L"T",
    L"T",
    L"U",
    L"U",
    L"V",
    L"V",
    L"W",
    L"W",
    L"X",
    L"X",
    L"Y",
    L"Y",
    L"Z",
    L"Z",
    L"!",
    L"@",
    L"#",
    L"$",
    L"%%",
    L"^",
    L"&",
    L"*",
    L"*",
    L"(",
    L")",
    L"-",
    L"-",
    L"_",
    L"=",
    L"+",
    L"+",
    L"Backspace",
    L"Tab",
    L"[",
    L"]",
    L"{",
    L"}",
    L"Enter",
    L"Enter",
    L";",
    L":",
    L"\'",
    L"\"",
    L"`",
    L"~",
    L"\\",
    L"|",
    L",",
    L"<",
    L".",
    L".",
    L">",
    L"/",
    L"/",
    L"?",
    L"Blank",
    L"\0"
};

//
//Unprintable Keys: functional keys defined by EFI spec
//
UINT8       UnprintableKeyCheckingMap[][6] =
{
    //EFIScanCode   //Extended  //XTScancode//CapsLock  //Shift     //NumLock
    SCAN_UP,        1,          0x48,       2,          2,          2,
    SCAN_UP,        0,          0x48,       2,          2,          0,
    SCAN_UP,        0,          0x48,       2,          1,          1,
    SCAN_DOWN,      1,          0x50,       2,          2,          2,
    SCAN_DOWN,      0,          0x50,       2,          2,          0,
    SCAN_DOWN,      0,          0x50,       2,          1,          1,
    SCAN_RIGHT,     1,          0x4d,       2,          2,          2,
    SCAN_RIGHT,     0,          0x4d,       2,          2,          0,
    SCAN_RIGHT,     0,          0x4d,       2,          1,          1,
    SCAN_LEFT,      1,          0x4b,       2,          2,          2,
    SCAN_LEFT,      0,          0x4b,       2,          2,          0,
    SCAN_LEFT,      0,          0x4b,       2,          1,          1,
    SCAN_HOME,      1,          0x47,       2,          2,          2,
    SCAN_HOME,      0,          0x47,       2,          2,          0,
    SCAN_HOME,      0,          0x47,       2,          1,          1,
    SCAN_END,       1,          0x4f,       2,          2,          2,
    SCAN_END,       0,          0x4f,       2,          2,          0,
    SCAN_END,       0,          0x4f,       2,          1,          1,
    SCAN_INSERT,    1,          0x52,       2,          2,          2,
    SCAN_INSERT,    0,          0x52,       2,          2,          0,
    SCAN_INSERT,    0,          0x52,       2,          1,          1,
    SCAN_DELETE,    1,          0x53,       2,          2,          2,
    SCAN_DELETE,    0,          0x53,       2,          2,          0,
    SCAN_DELETE,    0,          0x53,       2,          1,          1,
    SCAN_PAGE_UP,   1,          0x49,       2,          2,          2,
    SCAN_PAGE_UP,   0,          0x49,       2,          2,          0,
    SCAN_PAGE_UP,   0,          0x49,       2,          1,          1,
    SCAN_PAGE_DOWN, 1,          0x51,       2,          2,          2,
    SCAN_PAGE_DOWN, 0,          0x51,       2,          2,          0,
    SCAN_PAGE_DOWN, 0,          0x51,       2,          1,          1,
    SCAN_F1,        0,          0x3b,       2,          2,          2,
    SCAN_F2,        0,          0x3c,       2,          2,          2,
    SCAN_F3,        0,          0x3d,       2,          2,          2,
    SCAN_F4,        0,          0x3e,       2,          2,          2,
    SCAN_F5,        0,          0x3f,       2,          2,          2,
    SCAN_F6,        0,          0x40,       2,          2,          2,
    SCAN_F7,        0,          0x41,       2,          2,          2,
    SCAN_F8,        0,          0x42,       2,          2,          2,
    SCAN_F9,        0,          0x43,       2,          2,          2,
    SCAN_F10,       0,          0x44,       2,          2,          2,
    SCAN_ESC,       0,          0x01,       2,          2,          2,
    '\0',           0,          0,          0,          0,          0
};

CHAR16*      UnprintableKeySymbol[] =
{
    L"SCAN_UP",
    L"SCAN_UP",
    L"SCAN_UP",
    L"SCAN_DOWN",
    L"SCAN_DOWN",
    L"SCAN_DOWN",
    L"SCAN_RIGHT",
    L"SCAN_RIGHT",
    L"SCAN_RIGHT",
    L"SCAN_LEFT",
    L"SCAN_LEFT",
    L"SCAN_LEFT",
    L"SCAN_HOME",
    L"SCAN_HOME",
    L"SCAN_HOME",
    L"SCAN_END",
    L"SCAN_END",
    L"SCAN_END",
    L"SCAN_INSERT",
    L"SCAN_INSERT",
    L"SCAN_INSERT",
    L"SCAN_DELETE",
    L"SCAN_DELETE",
    L"SCAN_DELETE",
    L"SCAN_PAGE_UP",
    L"SCAN_PAGE_UP",
    L"SCAN_PAGE_UP",
    L"SCAN_PAGE_DOWN",
    L"SCAN_PAGE_DOWN",
    L"SCAN_PAGE_DOWN",
    L"SCAN_F1",
    L"SCAN_F2",
    L"SCAN_F3",
    L"SCAN_F4",
    L"SCAN_F5",
    L"SCAN_F6",
    L"SCAN_F7",
    L"SCAN_F8",
    L"SCAN_F9",
    L"SCAN_F10",
    L"SCAN_ESC",
    L"\0"
};

